@if(count($list))
@inject('commentPresenter', 'App\Presenters\CommentPresenter')
<div class="comment-comment">
	@foreach($list as $comment)
	<div class="media">
      <div class="media-left">
          <a href="#">
              <img class="media-object" data-src="/dashboard/img/avatar-3.jpg" alt="32x32" src="/dashboard/img/avatar-3.jpg" data-holder-rendered="true" style="width: 32px; height: 32px;">
          </a>
      </div>
      <div class="media-body">
        <div class="comment-content">{!! $commentPresenter->renderDetail($comment, ['include_user' => true]) !!}</div>
      	<div class="text-right">{{ $comment->created_at->format('Y-m-d H:s')}}<a href="javascript:;" class="reply-to-someone" data-id={{ $comment->id }}>回复</a></div>
      </div>
    </div>
    @endforeach
    @php
        $paginator = new \Illuminate\Pagination\LengthAwarePaginator([], $rootComment->comment_count, \App\Models\Topic::DETAIL_COMMENT_COMMENT_PAGE_SIZE, $page, ['path' => '/admin/comment_comment', 'query' => ['tid' => $rootComment->tid, 'root_id' => $rootComment->id]]);
        echo $paginator->links('vendor.pagination.bootstrap-4-comment-comment');
    @endphp
        <div style="margin-top: 10px;text-align: right;"><button class="reply-to-main-comment">我也说一句</button></div>
</div>
@endif